export default {
    powerCounter(state) {
        return state.counter * state.counter
    },
    more20stu(state) {
        return state.students.filter(s => s.age >= 20)
    },
    more20stulen(state, getters) { //getters也可以作参数
        return getters.more20stu.length
    },
    moreAgestu(state) {
        return age => state.students.filter(s => s.age >= age)
    }
}